#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
 
void paixu(float a[])
{
	for(int i=0;i<3;i++)
 {
 	for (int j=i+1;j<3;j++)
 	{
 		if (a[i]>a[j])
 		{
 			int tmp = a[i];
 			a[i]=a[j];
 			a[j] = tmp;
		 }
	}
  } 
}
int  main()
{ 
 float a[3];
 cin >> a[0] >> a[1] >> a[2];
 float x[3];
 cin >> x[0] >> x[1]  >> x[2];
 
 paixu(a);
 paixu(x);
 
 if (a[0]/x[0]== a[1]/x[1] && a[1]/x[1]== a[2]/x[2] )
 cout << "YES" << endl;
 else  
 cout << "NO" << endl;
 
/* for (int i=0;i<3;i++) 
 {
 	printf("a[%d]=%d\n",i,a[i]);
 	printf("x[%d]=%d\n",i,x[i]);

 }*/
    return 0;
 }
